# 获取 0-50 之间所有的奇数
a=[]
for i in range(50):
    if i%2!=0:
        a.append(i)
print(a)
print("**********************************")
b=[x for x in range(50) if x%2!=0]
print(b)
print("**********************************")

## 获取文本中所有单词的第一个字符
text="My House IS FULL OF FLOWERS"
first_charts=[]
for word in text.split():
    first_charts.append(word[0])
print(first_charts)
print("**********************************")
first_charts1=[word[0] for word in text.split()]
print(first_charts1)

## 获取两个列表对应位的乘积
## list a=[1,2,3,4] b=[5,6,7,8] 得到 a,b 对应位的乘积
a1=[1,2,3,4]
b1=[5,6,7,8]
ff=[i*j for i,j in zip(a1,b1)]
print(ff)       ## [5, 12, 21, 32]

